<template>
	<div class="tab_bar_body">
		<div v-for="(item,index) in items" :key="index" @click="goto(item)">
			{{item.title}}
		</div>
	</div>
</template>

<script>
	export default {
		props: {
			items: {
				type: String,
				required: true,
				validator: function(arry) {
					return arry.index <= 6
				}
			}
		},
		methods: {
			goto(item) {
				this.$router.push(item.path)
			}
		}
	}
</script>

<style scoped>
	.tab_bar_body {
		width: 100%;
		height: 64px;
		display: flex;
		position: fixed;
		bottom: 0px;
		left: 0px;
		justify-content: space-around;
		align-items: center;
		background-color: #fff;
	}
</style>
